#!/bin/bash

#Determines if IRLP_SPEAKER is running, and starts it if it isn't



#keeps ispeaker from dumping core
ulimit -c 0

FLAGS="-f$ECHO_TBD_HOST"

killall ispeaker >/dev/null 2>&1

#Run on port tbd sends data to.
 
FLAGS="$FLAGS -p$ECHO_TBD_SEND"

if [ "$FORCE_8BIT" = "YES" ] ; then
  ($BIN/ispeaker -8 $FLAGS || (sleep 2 ; $BIN/unkey; $SCRIPT/sfswrapper)) >/dev/null 2>&1 &
else
  ($BIN/ispeaker $FLAGS || (sleep 2 ; $BIN/unkey ; $SCRIPT/sfswrapper)) >/dev/null 2>&1 &
fi
